#pragma once

namespace SNMP 
{
	public ref class Value
	{
	public: 
		enum class Syntax
			{
				Integer,
				Octets,
				Null,
				Oid,
				Integer32,
				IPAddress,
				Cntr32,
				Gauge32,
				Timeticks,
				Opaque,
				Cntr64,
				UnsignedInteger32,
				NoSuchObject,
				NoSuchInstance,
				EndOfMibView
			};

	public:
		property Object^ Data
		{
			Object^ get(void){ return this->m_objData; }
			void set(System::Object^ value){ this->m_objData = value; }
		};

		property Syntax DataSyntax
		{
			Syntax get(void){ return this->m_Syntax; }
			void set(Syntax value){ this->m_Syntax = value;}
		};

	internal:
		Syntax m_Syntax;
		int m_intNumber;
		unsigned long m_ulngNumber;
		INT64 m_lngNumber;
		System::String^ m_strString;
		System::String^ m_strOid;
		System::String^ m_strIpAddress;
		byte m_bytEmpty;
		Object^ m_objData;

	public:
		Value(Syntax syntax, Object^ value);

	internal:
		Value(void);
		static smiVALUE ValueToSNMPValue(Value^ value);
		static Value^ SNMPValueToValue(smiVALUE value);
		static void ConvertSyntax(smiUINT32 syntax, Value^ value);
		static void ConvertSyntax(Syntax syntax, smiVALUE* value, Value^ oldData);
		static void ObjectToValue(Object^ srcValue, Value^ dstValue);
	};
}